<?php
/**
* 
*/
class Scan_recommend_products_model extends CI_Model
{
    private $_table = 'scan_recommend_products';

    public function findProductsId($params)
    {
        $this->db->select('products_id, type, sid');
        $this->db->from($this->_table);
        $this->db->where('sid', $params['sid']);

        if (!empty($params['type'])) {
            $this->db->where('type', $params['type']);
        }

        return $this->db->get();
    }
}